package engine.newUi
{
	import engine.control.loading.MultLoader;
	import engine.data.ResPath;
	import engine.ui.lite.BaseUI;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	
	import newx.com.control.button.NxButton;
	
	public class DrawPictureUI extends BaseUI
	{
		public var smallBtn	:NxButton;
		public var middBtn		:NxButton;
		public var MaxBtn		:NxButton;
		public var BackMc		:MovieClip;
		public var frame		:MovieClip;
		private var _myLogic	:DrawPictureLogic
		private static var _self:DrawPictureUI;
		public function DrawPictureUI(popupUI:Boolean=true)
		{
			super(popupUI);
		}
		public static function getInstance():DrawPictureUI
		{
			if(_self	==	null)
			{
				_self	=	new DrawPictureUI();
			}
			return _self;
		}
		override public function show(space:DisplayObjectContainer=null, onshow:Function=null, ...argc):void
		{
			if(!MultLoader.getInstance().getSourceByUrl(ResPath.SWF + "DrawPic.swf"))
			{
				MultLoader.getInstance().load([ResPath.SWF + "DrawPic.swf"],true,createImage);
			}else
			{
				createImage();
			}
		}
		private function createImage():void
		{
			super.show();
		}
		override public function Init():void
		{
			_myLogic	=	DrawPictureLogic.getInstance();
		}
		override protected function AfterHide():void
		{
			_myLogic.removeListent();
		}
		override protected function BeforeShow():void
		{
			_myLogic.BeforeShow();
		}
	}
}